function mongoose(url){
    let mongoose=require('mongoose');
    let urlDB="mongodb://localhost:27017/" + url;
    mongoose.connect(urlDB, {
        useNewUrlParser: true,
        useUnifiedTopology: true
    })
    mongoose.connection.on('connected',function(){
        console.log('数据库请求成功')
    })
}
module.exports=mongoose;